package jjn.kamacoder.case12;

import java.util.Scanner;

/**
 * @author Jiang Jining
 * @since 2023-08-30 20:15
 */
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int n = sc.nextInt();
            for (int i = 1; i <= 2 * n - 1; i++) {
                for (int j = 0; j < Math.abs(n - i); j++) {
                    System.out.print(" ");
                }
                int k = (i > n) ? 2 * n - i : i;
                for (int j = 1; j <= k; j++) {
                    System.out.print(j);
                }
                for (int j = k - 1; j >= 1; j--) {
                    System.out.print(j);
                }
                System.out.println();
            }
        }
    }
}
